import React, { Component } from 'react'
import Son from './Son'

export default class Father extends Component {
    state = {
        count: 100
    }
    render() {
        const { count } = this.state
        return (
            <div>
                我是父组件 -- { count }
                <button onClick={() => {
                    this.setState({
                        count: this.state.count += 1
                    })
                }}>点我</button>
                <Son count = { count }/>
            </div>
        )
    }
}
